home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / forms / frmwiz / chngfld.frm < prev    next >
Text File  |  1995-01-28  |  5KB  |  227 lines

  1. VERSION 2.00
  2. Begin Form ChngFld
  3. HelpContextID = 36
  4. BackColor       =   &H00C0C0C0&
  5. BorderStyle     =   3  'Fixed Double
  6. Caption         =   "Field Attributes"
  7. ClientHeight    =   2385
  8. ClientLeft      =   3120
  9. ClientTop       =   2565
  10. ClientWidth     =   4095
  11. ControlBox      =   0   'False
  12. Height          =   2790
  13. Left            =   3060
  14. LinkTopic       =   "Form1"
  15. MaxButton       =   0   'False
  16. MinButton       =   0   'False
  17. ScaleHeight     =   2385
  18. ScaleWidth      =   4095
  19. Top             =   2220
  20. Width           =   4215
  21. Begin SSCommand BtnCancel
  22. HelpContextID = 24
  23. AutoSize        =   2  'Adjust Button Size To Picture
  24. Caption         =   "&Cancel"
  25. Font3D          =   2  'Raised w/heavy shading
  26. Height          =   615
  27. Left            =   1560
  28. Picture         =   CHNGFLD.FRX:0000
  29. TabIndex        =   9
  30. Tag             =   "Cancel building the form"
  31. Top             =   1320
  32. Width           =   915
  33. End
  34. Begin SSCommand BtnOK
  35. HelpContextID = 37
  36. AutoSize        =   2  'Adjust Button Size To Picture
  37. Caption         =   "&OK"
  38. Font3D          =   2  'Raised w/heavy shading
  39. Height          =   615
  40. Left            =   660
  41. Picture         =   CHNGFLD.FRX:0302
  42. TabIndex        =   8
  43. Tag             =   "Generate the form code"
  44. Top             =   1320
  45. Width           =   915
  46. End
  47. Begin SSCommand BtnHelp
  48. Caption         =   "&Help"
  49. Font3D          =   2  'Raised w/heavy shading
  50. Height          =   615
  51. Left            =   2460
  52. Picture         =   CHNGFLD.FRX:0604
  53. TabIndex        =   7
  54. Top             =   1320
  55. Width           =   915
  56. End
  57. Begin SSPanel cMsg
  58. Align           =   2  'Align Bottom
  59. Alignment       =   1  'Left Justify - MIDDLE
  60. BevelInner      =   1  'Inset
  61. BorderWidth     =   2
  62. ForeColor       =   &H00FF0000&
  63. Height          =   375
  64. Left            =   0
  65. TabIndex        =   5
  66. Top             =   2010
  67. Width           =   4095
  68. End
  69. Begin SSCheck ChkSameLine
  70. HelpContextID = 38
  71. Caption         =   "Put On Same Line As Previous Field"
  72. Height          =   255
  73. Left            =   120
  74. TabIndex        =   1
  75. Tag             =   "Place field on the same line as previous field"
  76. Top             =   960
  77. Width           =   3675
  78. End
  79. Begin TextBox TxtLabel
  80. HelpContextID = 39
  81. BackColor       =   &H00C0C0C0&
  82. Height          =   315
  83. Left            =   1140
  84. TabIndex        =   0
  85. Tag             =   "Label to use on the form for the field"
  86. Text            =   "Field Name"
  87. Top             =   540
  88. Width           =   2655
  89. End
  90. Begin SSPanel LblField
  91. HelpContextID = 40
  92. Alignment       =   1  'Left Justify - MIDDLE
  93. BevelInner      =   2  'Raised
  94. BevelOuter      =   0  'None
  95. BorderWidth     =   2
  96. Caption         =   "Field Name"
  97. Height          =   315
  98. Left            =   1140
  99. TabIndex        =   3
  100. Top             =   120
  101. Width           =   2655
  102. End
  103. Begin Label LblRow
  104. BackColor       =   &H00FFFF80&
  105. Caption         =   "LblRow"
  106. Height          =   315
  107. Left            =   120
  108. TabIndex        =   6
  109. Top             =   1380
  110. Visible         =   0   'False
  111. Width           =   495
  112. End
  113. Begin Label Label1
  114. AutoSize        =   -1  'True
  115. BackColor       =   &H00C0C0C0&
  116. Caption         =   "Field Label"
  117. ForeColor       =   &H00FF0000&
  118. Height          =   195
  119. Index           =   1
  120. Left            =   120
  121. TabIndex        =   4
  122. Top             =   600
  123. Width           =   945
  124. End
  125. Begin Label Label1
  126. AutoSize        =   -1  'True
  127. BackColor       =   &H00C0C0C0&
  128. Caption         =   "Field Name"
  129. ForeColor       =   &H00FF0000&
  130. Height          =   195
  131. Index           =   0
  132. Left            =   120
  133. TabIndex        =   2
  134. Top             =   180
  135. Width           =   960
  136. End
  137. End
  138. Option Explicit
  139.  
  140. Sub BtnCancel_Click ()
  141.     Unload ChngFld
  142.  
  143. End Sub
  144.  
  145. Sub BtnCancel_GotFocus ()
  146.     cMsg.Caption = BtnCancel.Tag
  147.  
  148. End Sub
  149.  
  150. Sub BtnCancel_LostFocus ()
  151.     cMsg.Caption = ""
  152.  
  153. End Sub
  154.  
  155. Sub BtnHelp_Click ()
  156.     SendKeys "{F1}"
  157.  
  158. End Sub
  159.  
  160. Sub BtnOK_Click ()
  161.     Dim irow As Integer
  162.     irow = Val(LblRow.Caption)
  163.     DataForm.GrdFields.Row = irow
  164.     DataForm.GrdFields.Col = 1
  165.     DataForm.GrdFields.Text = TxtLabel.Text
  166.     DataForm.GrdFields.Col = 2
  167.     If ChkSameLine.Value = True Then
  168.         DataForm.GrdFields.Text = "Yes"
  169.     Else
  170.         DataForm.GrdFields.Text = "No"
  171.     End If
  172.     Unload ChngFld
  173.  
  174. End Sub
  175.  
  176. Sub BtnOK_GotFocus ()
  177.     cMsg.Caption = BtnOK.Tag
  178.  
  179. End Sub
  180.  
  181. Sub BtnOK_LostFocus ()
  182.     cMsg.Caption = ""
  183.  
  184. End Sub
  185.  
  186. Sub ChkSameLine_GotFocus ()
  187.     cMsg.Caption = ChkSameLine.Tag
  188.  
  189. End Sub
  190.  
  191. Sub ChkSameLine_LostFocus ()
  192.     cMsg.Caption = ""
  193.  
  194. End Sub
  195.  
  196. Sub FldGotFocus (PControl As Control)
  197.     PControl.BackColor = BLUE
  198.     PControl.ForeColor = WHITE
  199.     PControl.SelStart = 0
  200.     PControl.SelLength = 1000
  201.     cMsg.Caption = PControl.Tag
  202.  
  203. End Sub
  204.  
  205. Sub FldLostFocus (PControl As Control)
  206.     PControl.BackColor = RB_GRAY
  207.     PControl.ForeColor = BLACK
  208.     cMsg.Caption = ""
  209.  
  210. End Sub
  211.  
  212. Sub Form_Paint ()
  213.     Form3d Me
  214.  
  215. End Sub
  216.  
  217. Sub TxtLabel_GotFocus ()
  218.     FldGotFocus TxtLabel
  219.  
  220. End Sub
  221.  
  222. Sub TxtLabel_LostFocus ()
  223.     FldLostFocus TxtLabel
  224.  
  225. End Sub
  226.  
  227.